public class BankMac {

//	public static String compute(String inStr) {
//
//		// convert input String to a char[]
//		// convert that char[] to byte[]
//		// get the md5 digest as byte[]
//		// bit-wise AND that byte[] with 0xff
//		// prepend "0" to the output StringBuffer to make sure that we don't end
//		// up with
//		// something like "e21ff" instead of "e201ff"
//
////		if (null == md5) {
////			new MD5Arithmetic();
////		}
////
////		byte[] md5Bytes;
////		synchronized (lock) {
////			md5Bytes = md5.digest(inStr.getBytes());
////		}
//		StringBuffer hexValue = new StringBuffer();
//		for (int i = 0; i < md5Bytes.length; i++) {
//			int val = ((int) md5Bytes[i]) & 0xff;
//			if (val < 16)
//				hexValue.append("0");
//			hexValue.append(Integer.toHexString(val));
//		}
//		return hexValue.toString();
//	}

	public static void main(String[] args) {
		byte[] md5Bytes = { -3 };
		StringBuffer hexValue = new StringBuffer();
		for (int i = 0; i < md5Bytes.length; i++) {
			int val = ((int) md5Bytes[i]) & 0xff;
			
			if (val < 16)
				hexValue.append("0");
			hexValue.append(Integer.toHexString(val));
		}
	}

}
